<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>日志管理</title>
		<link rel="stylesheet" type="text/css" href="../layui/css/layui.css"/>
		<link rel="stylesheet" href="../css/delDownload.css"/>
		<style type="text/css">
			.log-con{
				padding: 0 15px 15px 15px;
			}
			.log-con .layui-table-body table tbody .layui-table-hover{
				background: #fffdd3 !important;
			}
			.log-con .layui-table-body table tbody .layui-table-click{
				background: #fdef9b !important;
			}
			.log-con .layui-table,.layui-table-view{
				border: none;
				margin-top: 0px;
			}
			.log-con .layui-table-tool{
				margin-bottom: 10px;
			}
			.layui-form-select dl dd.layui-this{
				background-color:#1E9FFF!important;
			}
			
		</style>
	</head>
	<body>
		<div class="log-con">
			<!--文章表格列表-->
			<table class="layui-hide log-tab" id="sellog" lay-filter="sellog" ></table>
			
			<!--表格顶部菜单条-->
			<script type="text/html" id="toolbarDemo">
				<div class="layui-inline"> 	
					<div class="layui-input-inline">
						<select id="sellogtype" lay-verify="required">
        					<option value="00">请选择操作类型</option>
        					<option value="add">添加</option>
        					<option value="update">修改</option>
        					<option value="delete">删除</option>
      					</select>
				   </div>
					<div class="layui-input-inline">
						<input id="username" type="text" autocomplete="off" lay-verify="username" placeholder="请输入操作人真实姓名" class="layui-input">
				   </div>
				    <div class="layui-inline">
	      				<button class="layui-btn layui-bg-blue" lay-event="seleBtn" lay-submit="" lay-filter="demo1">查询</button>
				    </div>
				</div>
			</script>
		</div>
		
		<script src="../js/jquery-3.3.1.js"></script>
		<script src="../layui/layui.js"></script>
		<script type="text/javascript">
		layui.use('table', function() {
			var table = layui.table;
			table.render({
				elem: '#sellog',
				url: '../backlogmanagement/getbackloglist',
				toolbar: '#toolbarDemo',
				title: '错误日志表',
				height:'full-60',
				skin: 'line',
				even: true,
				cols: [
					[{
						field: 'userName',
						title: '用户名',	
						unresize: true
					}, {
						field: 'realName',
						title: '真实姓名'
					}, {
						field: 'roleName',
						title: '角色名称'
					}, {
						field: 'phone',
						title: '联系电话'
					}, {
						field: 'operationType',
						title: '操作类型'
					}, {
						field: 'menuName',
						title: '菜单名称'					
					},{
						field: 'operationDescribe',
						title: '操作描述'						
					},{
						field: 'operationTime',
						title: '操作时间'							
					}]
				],
				page: {
					layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
					groups: 5,
					limit: 10,
					limits: [10, 20, 30, 40, 50],
					theme: '#1E9FFF',						
				}
			});

			//顶部查询输入框
			table.on('toolbar(sellog)', function(obj) {
				var checkStatus = table.checkStatus(obj.config.id);
				switch(obj.event) {
					case 'seleBtn':
						var username = $("#username").val();
						var sellogtype=$("#sellogtype").val();
						if(sellogtype=="00" || sellogtype==undefined){
							sellogtype="";
						}
						table.render({
							elem: '#sellog',
							url: '../backlogmanagement/getbackloglist?realname='+username+'&operationtype='+sellogtype,
							toolbar: '#toolbarDemo',
							title: '错误日志表',
							height:'full-60',
							skin: 'line',
							even: true,
							cols: [
								[{
									field: 'userName',
									title: '用户名',	
									unresize: true
								}, {
									field: 'realName',
									title: '真实姓名'
								}, {
									field: 'roleName',
									title: '角色名称'
								}, {
									field: 'phone',
									title: '联系电话'
								}, {
									field: 'operationType',
									title: '操作类型'
								}, {
									field: 'menuName',
									title: '菜单名称'					
								},{
									field: 'operationDescribe',
									title: '操作描述'						
								},{
									field: 'operationTime',
									title: '操作时间'							
								}]
							],
							page: {
								layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
								groups: 5,
								limit: 10,
								limits: [10, 20, 30, 40, 50],
								theme: '#1E9FFF',						
							}
						});
						$("#username").val(username);
						$("#sellogtype").val(sellogtype);
						form.render();
					break;
				};
			});
		});
		</script>
	</body>
</html>
